package com.dlg.user.dao.mysql.mappers.user;

import com.dlg.user.dao.mysql.annotation.OddJobRepository;
import com.dlg.user.domain.user.OjUser;
import com.dlg.commons.enums.UserType;
import org.apache.ibatis.annotations.Param;

import java.math.BigInteger;

/**
 * Created by zhangjinxia on 2017/8/7.
 */
@OddJobRepository
public interface OjUserMapper {

    void save(@Param("user") OjUser ojUser);

    OjUser findByPhoneAndType(@Param("phone") String phone, @Param("type") UserType type);

    OjUser findById(@Param("id") BigInteger id);

    void updateUserOpenId(@Param("id")BigInteger id, @Param("openId") String openId);

    Integer getJobCountByUserId(@Param("userId") BigInteger userId);

    void updateUserAuditById(@Param("user")OjUser ojUser);

    void update(@Param("user")OjUser user);
}
